package self.hoy.demo.grainmall.auth.vo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author hyh
 * @date 2020/8/13
 */
@Data
public class UserLoginVo implements Serializable {
    private static final long serialVersionUID = 9151291276625645179L;

    @NotEmpty(message="请填写用户名或者手机号码")
//    @Length(min = 6, max = 18, message = "请填写6-18位的用户名")
    private String account;


    @NotEmpty(message="请填写手机号码")
    @Pattern(regexp = "^1[3456789]\\d{9}$", message = "请检查手机号码格式")
    private String password;
}
